project(
  av_widget
  LANGUAGES CXX
)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_AUTOUIC_SEARCH_PATHS (ui))
find_package(Qt5 COMPONENTS Widgets Core REQUIRED)

add_definitions(-DQLS_AV_WIDGET_LIBRARY)

set(_srcs
    src/qls_av_widget.cpp
    src/qls_progress_bar.cpp
    src/qls_volume_tool_tip_widget.cpp
)

set(_headers
    include/av_widget/qls_av_widget.h
    include/av_widget/qls_av_widget_global.h
    include/av_widget/qls_progress_bar.h
    include/av_widget/qls_volume_tool_tip_widget.h
)

set(_ui
    ui/qls_av_widget.ui
    ui/qls_volume_tool_tip_widget.ui
)

add_library(av_widget SHARED ${_srcs} ${_headers} ${_ui})
target_link_libraries(av_widget PUBLIC
    av_player
    Qt5::Widgets Qt5::Core ${CMAKE_THREAD_LIBS_INIT}
)
target_include_directories(av_widget PUBLIC include)
